package view;

import java.awt.DisplayMode;

public class ScreenMode {
	DisplayMode displayMode;
	
	/** Constructs a new screen mode */
	public ScreenMode() {
	}
	
	/** Constructs a new screen mode */
	public ScreenMode(DisplayMode displayMode) {
		this.displayMode = displayMode;
	}
	
	/** Constructs a new screen mode */
	public ScreenMode(int width, int height, int bitDepth, int refreshRate) {
		this.displayMode = new DisplayMode(width, height, bitDepth, refreshRate);
	}
	
	/** Returns a string implementation of the object */
	@Override
	public String toString() {
		return String.format("%dx%d %d bit %d Hz",
				this.displayMode.getWidth(),
				this.displayMode.getHeight(),
				this.displayMode.getBitDepth(),
				this.displayMode.getRefreshRate());
	}
}